# 1. Source functions ----
source("functions/graphical_par.R")
source("functions/theme_graph.R")
source("functions/pred_vbgf.R")
# 2. Required packages ----
library(tidyverse)
library(kableExtra)
library(formattable)
library(rfishbase)
library(readxl)
library(plotly)
library(fishflux)
# 3. Set theme_graph() as the default ggplot theme ----
theme_set(theme_graph())
# 4. Load data ----
data_complete <- read.csv("./../data/back-calculated-size-at-age_morat-et-al.csv")data_complete %>%
filter(!is.na(Li_sp_m)) %>%
summarize_at(vars("ID", "Species", "Family"), n_distinct, na.rm = TRUE) %>%
bind_rows(data_complete %>%
summarize_at(vars("ID", "Species", "Family"), n_distinct, na.rm = TRUE), .) %>%
mutate(Type = c("All data", "Back-calculated"), .before = 1) %>%
kable(.,
col.names = c("", "Individual", "Species", "Family"),
caption = "Table 1. Comparison of numbers of individuals, species and family for the overall dataset and for back-calculated data") %>%
kable_styling(bootstrap_options = c("striped", "hover"))| Individual | Species | Family | |
|---|---|---|---|
| All data | 855 | 51 | 16 |
| Back-calculated | 710 | 45 | 16 |
data_complete %>%
group_by(Species) %>%
summarise(n = length(unique(ID)),
min_lencap = round(min(Lcpt, na.rm = TRUE), 0),
max_lencap = round(max(Lcpt, na.rm = TRUE), 0),
max_age = max(Agei, na.rm = TRUE)) %>%
kable(.,
col.names = c("Species", "n", "Min length (TL, mm)", "Max length (TL, mm)", "Age max (years)"),
caption = "Table 2. Number of individuals, minimum and maximum total length (mm) and maximum age, by species") %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
column_spec(1, italic = T)| Species | n | Min length (TL, mm) | Max length (TL, mm) | Age max (years) |
|---|---|---|---|---|
| Abudefduf sexfasciatus | 16 | 51 | 172 | 13 |
| Acanthurus achilles | 17 | 130 | 246 | 27 |
| Acanthurus lineatus | 8 | 123 | 362 | 23 |
| Acanthurus nigricans | 8 | 150 | 210 | 9 |
| Acanthurus pyroferus | 18 | 51 | 230 | 19 |
| Acanthurus triostegus | 18 | 147 | 194 | 12 |
| Balistapus undulatus | 22 | 41 | 283 | 18 |
| Caranx melampygus | 7 | 368 | 712 | 15 |
| Centropyge bispinosa | 9 | 28 | 80 | 11 |
| Centropyge flavissima | 28 | 47 | 150 | 27 |
| Cephalopholis argus | 41 | 120 | 450 | 21 |
| Cephalopholis urodeta | 8 | 150 | 214 | 17 |
| Chaetodon citrinellus | 13 | 55 | 101 | 6 |
| Chaetodon ornatissimus | 10 | 122 | 175 | 10 |
| Cheilinus chlorourus | 8 | 96 | 299 | 6 |
| Chlorurus spilurus | 34 | 164 | 344 | 16 |
| Chromis iomelas | 20 | 39 | 61 | 5 |
| Chromis viridis | 6 | 115 | 148 | 9 |
| Ctenochaetus marginatus | 15 | 99 | 270 | 13 |
| Ctenochaetus striatus | 26 | 153 | 218 | 17 |
| Dascyllus aruanus | 20 | 51 | 71 | 7 |
| Dascyllus flavicaudus | 8 | 89 | 104 | 13 |
| Epibulus insidiator | 17 | 157 | 350 | 16 |
| Epinephelus fasciatus | 10 | 123 | 256 | 13 |
| Epinephelus hexagonatus | 16 | 139 | 268 | 14 |
| Epinephelus merra | 46 | 108 | 261 | 17 |
| Epinephelus polyphekadion | 14 | 252 | 514 | 20 |
| Gnathodentex aureolineatus | 8 | 197 | 255 | 17 |
| Gymnosarda unicolor | 4 | 499 | 985 | 7 |
| Halichoeres trimaculatus | 13 | 64 | 186 | 5 |
| Lutjanus fulvus | 12 | 195 | 289 | 21 |
| Lutjanus gibbus | 17 | 113 | 155 | 1 |
| Lutjanus kasmira | 37 | 70 | 326 | 30 |
| Monotaxis grandoculis | 9 | 200 | 505 | 20 |
| Mulloidichthys flavolineatus | 14 | 257 | 311 | 6 |
| Myripristis berndti | 30 | 147 | 279 | 24 |
| Naso lituratus | 17 | 228 | 432 | 10 |
| Naso unicornis | 4 | 488 | 613 | 17 |
| Odonus niger | 18 | 176 | 350 | 16 |
| Ostorhinchus angustatus | 15 | 46 | 83 | 6 |
| Ostorhinchus apogonoides | 30 | 52 | 96 | 7 |
| Parupeneus barberinus | 16 | 82 | 496 | 6 |
| Plectropomus laevis | 31 | 356 | 957 | 22 |
| Pristiapogon taeniopterus | 32 | 51 | 104 | 8 |
| Sargocentron microstoma | 23 | 62 | 204 | 13 |
| Scarus psittacus | 8 | 195 | 311 | 6 |
| Siganus argenteus | 11 | 236 | 388 | 13 |
| Siganus spinus | 4 | 199 | 254 | 3 |
| Stegastes albifasciatus | 7 | 43 | 94 | 8 |
| Stegastes nigricans | 14 | 45 | 138 | 13 |
| Zebrasoma scopas | 18 | 110 | 166 | 24 |
data_complete %>%
group_by(Species, Location) %>%
summarise(n = length(unique(ID))) %>%
pivot_wider(names_from = Location, values_from = n) %>%
mutate(Gambiers = cell_spec(Gambiers, "html", color = ifelse(is.na(Gambiers), "white", "#446CB3")),
Hao = cell_spec(Hao, "html", color = ifelse(is.na(Hao), "white", "#446CB3")),
Marquesas = cell_spec(Marquesas, "html", color = ifelse(is.na(Marquesas), "white", "#446CB3")),
Moorea = cell_spec(Moorea, "html", color = ifelse(is.na(Moorea), "white", "#446CB3")),
Manuae = cell_spec(Manuae, "html", color = ifelse(is.na(Manuae), "white", "#446CB3")),
Tuamotu = cell_spec(Tuamotu, "html", color = ifelse(is.na(Tuamotu), "white", "#446CB3"))) %>%
kable(.,
format = "html", escape = FALSE,
caption = "Table 3. Number of individuals of each species by location") %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
column_spec(1, italic = T)| Species | Gambiers | Moorea | Manuae | Marquesas | Tuamotu | Hao |
|---|---|---|---|---|---|---|
| Abudefduf sexfasciatus | 11 | 5 | NA | NA | NA | NA |
| Acanthurus achilles | 7 | NA | 10 | NA | NA | NA |
| Acanthurus lineatus | NA | NA | NA | 8 | NA | NA |
| Acanthurus nigricans | NA | NA | NA | 8 | NA | NA |
| Acanthurus pyroferus | NA | NA | NA | 18 | NA | NA |
| Acanthurus triostegus | 3 | 11 | NA | 4 | NA | NA |
| Balistapus undulatus | NA | 14 | NA | 8 | NA | NA |
| Caranx melampygus | NA | 5 | NA | NA | 2 | NA |
| Centropyge bispinosa | NA | 9 | NA | NA | NA | NA |
| Centropyge flavissima | 9 | 7 | NA | 12 | NA | NA |
| Cephalopholis argus | 6 | 10 | NA | NA | 10 | 15 |
| Cephalopholis urodeta | 8 | NA | NA | NA | NA | NA |
| Chaetodon citrinellus | NA | 13 | NA | NA | NA | NA |
| Chaetodon ornatissimus | 4 | NA | NA | 6 | NA | NA |
| Cheilinus chlorourus | 2 | 6 | NA | NA | NA | NA |
| Chlorurus spilurus | 13 | 19 | NA | NA | 2 | NA |
| Chromis iomelas | NA | 20 | NA | NA | NA | NA |
| Chromis viridis | 6 | NA | NA | NA | NA | NA |
| Ctenochaetus marginatus | NA | NA | NA | 15 | NA | NA |
| Ctenochaetus striatus | 11 | 15 | NA | NA | NA | NA |
| Dascyllus aruanus | NA | 20 | NA | NA | NA | NA |
| Dascyllus flavicaudus | 8 | NA | NA | NA | NA | NA |
| Epibulus insidiator | 12 | 5 | NA | NA | NA | NA |
| Epinephelus fasciatus | NA | NA | NA | 10 | NA | NA |
| Epinephelus hexagonatus | NA | NA | NA | NA | NA | 16 |
| Epinephelus merra | 13 | 20 | NA | NA | NA | 13 |
| Epinephelus polyphekadion | NA | NA | NA | NA | NA | 14 |
| Gnathodentex aureolineatus | 8 | NA | NA | NA | NA | NA |
| Gymnosarda unicolor | 4 | NA | NA | NA | NA | NA |
| Halichoeres trimaculatus | 7 | 6 | NA | NA | NA | NA |
| Lutjanus fulvus | NA | 6 | NA | NA | 6 | NA |
| Lutjanus gibbus | NA | NA | NA | 17 | NA | NA |
| Lutjanus kasmira | 2 | NA | NA | 35 | NA | NA |
| Monotaxis grandoculis | 5 | 3 | NA | NA | 1 | NA |
| Mulloidichthys flavolineatus | NA | 14 | NA | NA | NA | NA |
| Myripristis berndti | 7 | 15 | NA | 8 | NA | NA |
| Naso lituratus | 11 | 6 | NA | NA | NA | NA |
| Naso unicornis | 4 | NA | NA | NA | NA | NA |
| Odonus niger | NA | 13 | NA | 5 | NA | NA |
| Ostorhinchus angustatus | NA | 15 | NA | NA | NA | NA |
| Ostorhinchus apogonoides | NA | NA | NA | 30 | NA | NA |
| Parupeneus barberinus | 5 | 4 | NA | 7 | NA | NA |
| Plectropomus laevis | 12 | NA | NA | NA | NA | 19 |
| Pristiapogon taeniopterus | NA | NA | NA | 32 | NA | NA |
| Sargocentron microstoma | NA | 17 | NA | 6 | NA | NA |
| Scarus psittacus | NA | 3 | NA | NA | 5 | NA |
| Siganus argenteus | 6 | 2 | NA | NA | 3 | NA |
| Siganus spinus | NA | 4 | NA | NA | NA | NA |
| Stegastes albifasciatus | NA | 7 | NA | NA | NA | NA |
| Stegastes nigricans | 3 | 11 | NA | NA | NA | NA |
| Zebrasoma scopas | 5 | 13 | NA | NA | NA | NA |
# 1. Number of NA by variable
data_complete %>%
summarise_all(~(sum(is.na(.)))) %>%
t(.) %>%
as.data.frame() %>%
kable(., col.names = c("NA"), caption = "Table 4. Number of rows with Non-Available (NA) data by variable") %>%
kable_styling(bootstrap_options = c("striped", "hover"))| NA | |
|---|---|
| Family | 0 |
| Genus | 0 |
| Species | 0 |
| ID | 0 |
| Agei | 0 |
| Ri | 387 |
| Agecpt | 0 |
| Rcpt | 0 |
| Lcpt | 0 |
| L0p | 0 |
| R0p | 2811 |
| Li_sp_m | 410 |
| Li_sp_sd | 410 |
| Li_sploc_m | 757 |
| Li_sploc_sd | 757 |
| Weight | 603 |
| Location | 0 |
| Observer | 0 |
ggplot(data_complete, aes(x = Agei, y = Ri)) +
geom_point(color = col_color_graph, fill = col_fill_graph, size = 1, shape = 21)+
theme(strip.text.x = element_text(size = 8, face = "italic"),
strip.background = element_rect(colour = "black", fill = col_facet, size = 1),
plot.title = element_text(colour = col_color_graph),
plot.subtitle = element_text(colour = "black")) +
facet_wrap(~Species, scales = "free", ncol = 5) +
labs(x = "Age (years)", y = "Radius at age i (mm)")Figure 1. Relation between otolith radius (Ri) and age (Agei).
ggplot(data_complete, aes(x = Agei, y = Li_sp_m)) +
geom_point(color = col_color_graph, fill = col_fill_graph, size = 1, shape = 21)+
theme(strip.text.x = element_text(size = 8),
strip.background = element_rect(colour = "black", fill = col_facet, size = 1),
plot.title = element_text(colour = col_color_graph),
plot.subtitle = element_text(colour = "black"),
strip.text.y = element_text(angle = 360, face = "italic")) +
facet_wrap(~Species, scales = "free", ncol = 5) +
labs(x = "Age (years)", y = "Length at age i (mm)")Figure 2. Relation between length (TL, mm) and age by species.
ggplot(data_complete, aes(x = Agei, y = Li_sploc_m)) +
geom_point(color = col_color_graph, fill = col_fill_graph, size = 1, shape = 21)+
theme(strip.text.x = element_text(size = 8),
strip.background = element_rect(colour = "black", fill = col_facet, size = 1),
plot.title = element_text(colour = col_color_graph),
plot.subtitle = element_text(colour = "black"),
strip.text.y = element_text(angle = 360, face = "italic")) +
facet_grid(Species~Location, scales = "free") +
labs(x = "Age (years)", y = "Length at age i (mm)")Figure 3. Relation between length (TL, mm) and age by species and location.
# 1. Growth parameters ----
read.csv("./../data/results_regressions_vbgc.csv") %>%
mutate(k = paste0(round(k, 3), " (", round(k_sd, 3), ")"),
linf = paste0(round(linf, 3), " (", round(linf_sd, 3), ")"),
t0 = paste0(round(t0, 3), " (", round(t0_sd, 3), ")")) %>%
select(Species, Location, linf, k, t0) %>%
kable(.,
col.names = c("Species", "Location", "Linf", "K", "t0"),
caption = "Table 5. Values of Von Bertalanffy parameters estimated through Bayesian framework by species and location. Standard deviation are the values in parentheses. Linf is expressed in TL and cm.") %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
column_spec(1, italic = T)| Species | Location | Linf | K | t0 |
|---|---|---|---|---|
| Acanthurus achilles | Manuae | 19.209 (0.675) | 0.988 (0.129) | -0.039 (0.036) |
| Acanthurus lineatus | Marquesas | 26.837 (3.144) | 0.401 (0.115) | -0.215 (0.153) |
| Acanthurus nigricans | Marquesas | 16.989 (0.982) | 1.134 (0.174) | -0.02 (0.025) |
| Acanthurus pyroferus | Marquesas | 20.031 (1.422) | 0.467 (0.095) | -0.193 (0.139) |
| Acanthurus triostegus | Moorea | 15.714 (0.517) | 0.626 (0.066) | -0.098 (0.049) |
| Ctenochaetus marginatus | Marquesas | 22.129 (2.53) | 0.375 (0.071) | -0.159 (0.066) |
| Ctenochaetus striatus | Moorea | 17.283 (0.577) | 1.014 (0.088) | -0.029 (0.02) |
| Ctenochaetus striatus | Gambiers | 17.094 (0.558) | 0.5 (0.044) | -0.143 (0.058) |
| Naso lituratus | Gambiers | 32.04 (1.897) | 1.234 (0.168) | -0.01 (0.018) |
| Ostorhinchus angustatus | Moorea | 7.398 (0.41) | 0.604 (0.082) | -0.125 (0.042) |
| Ostorhinchus apogonoides | Marquesas | 8.174 (0.213) | 0.916 (0.058) | -0.066 (0.013) |
| Pristiapogon taeniopterus | Marquesas | 7.988 (0.264) | 0.85 (0.073) | -0.084 (0.024) |
| Balistapus undulatus | Marquesas | 22.251 (3.28) | 0.304 (0.137) | -0.211 (0.144) |
| Balistapus undulatus | Moorea | 23.68 (7.401) | 0.196 (0.078) | -0.72 (0.532) |
| Odonus niger | Moorea | 24.067 (1.341) | 0.526 (0.065) | -0.089 (0.044) |
| Caranx melampygus | Moorea | 92.665 (4.896) | 0.085 (0.009) | -0.535 (0.216) |
| Chaetodon ornatissimus | Marquesas | 14.811 (1.242) | 0.995 (0.216) | -0.026 (0.047) |
| Myripristis berndti | Gambiers | 23.964 (1.679) | 0.273 (0.046) | -0.499 (0.179) |
| Myripristis berndti | Marquesas | 21.923 (0.549) | 0.327 (0.031) | -0.359 (0.112) |
| Myripristis berndti | Moorea | 18.006 (0.941) | 0.434 (0.05) | -0.153 (0.053) |
| Sargocentron microstoma | Moorea | 16.268 (0.543) | 0.66 (0.053) | -0.056 (0.027) |
| Epibulus insidiator | Gambiers | 26.837 (1.872) | 0.304 (0.038) | -0.258 (0.079) |
| Halichoeres trimaculatus | Gambiers | 18.016 (1.694) | 0.706 (0.15) | -0.035 (0.054) |
| Gnathodentex aureolineatus | Gambiers | 20.487 (1.002) | 0.38 (0.057) | -0.291 (0.115) |
| Lutjanus fulvus | Moorea | 23.967 (2.383) | 0.754 (0.177) | -0.041 (0.042) |
| Lutjanus fulvus | Tuamotu | 26.727 (2.401) | 0.293 (0.056) | -0.416 (0.18) |
| Mulloidichthys flavolineatus | Moorea | 25.68 (0.548) | 1.275 (0.09) | -0.013 (0.013) |
| Centropyge bispinosa | Moorea | 5.327 (0.848) | 0.864 (0.698) | -0.071 (0.036) |
| Centropyge flavissima | Marquesas | 7.279 (1.621) | 0.916 (0.325) | -0.045 (0.039) |
| Centropyge flavissima | Moorea | 8.223 (0.839) | 1.201 (0.324) | -0.03 (0.026) |
| Centropyge flavissima | Gambiers | 12.553 (1.366) | 0.183 (0.037) | -0.923 (0.244) |
| Abudefduf sexfasciatus | Gambiers | 11.35 (5.929) | 1.823 (1.544) | 0.395 (0.747) |
| Chromis iomelas | Moorea | 5.068 (0.446) | 1.146 (0.249) | -0.06 (0.026) |
| Chromis viridis | Gambiers | 11.782 (1.19) | 0.893 (0.36) | -0.057 (0.062) |
| Dascyllus aruanus | Moorea | 5.608 (0.221) | 0.897 (0.099) | -0.055 (0.028) |
| Dascyllus flavicaudus | Gambiers | 9.335 (0.628) | 0.342 (0.04) | -0.24 (0.074) |
| Stegastes nigricans | Moorea | 13.463 (2.073) | 0.306 (0.126) | -0.354 (0.194) |
| Chlorurus spilurus | Moorea | 22.614 (1.346) | 1.035 (0.18) | -0.025 (0.041) |
| Chlorurus spilurus | Gambiers | 23.113 (1.832) | 0.67 (0.13) | -0.079 (0.053) |
| Cephalopholis argus | Moorea | 41.864 (10.28) | 0.192 (0.128) | -0.788 (0.636) |
| Cephalopholis argus | Tuamotu | 34.998 (5.058) | 0.199 (0.06) | -0.526 (0.206) |
| Cephalopholis argus | Gambiers | 42.876 (1.612) | 0.2 (0.022) | -0.651 (0.17) |
| Cephalopholis argus | Hao | 43.468 (6.108) | 0.196 (0.055) | -0.29 (0.097) |
| Cephalopholis urodeta | Gambiers | 21.118 (2.06) | 0.142 (0.032) | -0.686 (0.185) |
| Epinephelus fasciatus | Marquesas | 22.126 (1.916) | 0.552 (0.079) | -0.051 (0.035) |
| Epinephelus hexagonatus | Hao | 21.66 (1.051) | 0.527 (0.06) | -0.091 (0.053) |
| Epinephelus merra | Moorea | 14.266 (0.898) | 1.13 (0.093) | -0.018 (0.015) |
| Epinephelus merra | Gambiers | 18.685 (0.91) | 0.599 (0.075) | -0.112 (0.058) |
| Epinephelus merra | Hao | 22.577 (0.612) | 0.791 (0.077) | -0.05 (0.035) |
| Epinephelus polyphekadion | Hao | 54.938 (5.686) | 0.153 (0.021) | -0.412 (0.094) |
| Plectropomus laevis | Gambiers | 91.508 (3.978) | 0.156 (0.013) | -0.558 (0.118) |
| Plectropomus laevis | Hao | 91.742 (5.664) | 0.274 (0.03) | -0.026 (0.026) |
| Siganus argenteus | Gambiers | 33.002 (4.327) | 0.225 (0.055) | -0.333 (0.217) |
# 1. Growth curves ----
read.csv("./../data/results_regressions_prediction.csv") %>%
ggplot(data = .) +
geom_ribbon(aes(x = age, ymin = ypred_lq, ymax = ypred_uq), fill = "#86e2d5", alpha = 0.6) +
geom_line(aes(x = age, y = ypred_m), color = "#2abb9b") +
geom_point(data = data_complete %>%
mutate(Li_sp_m = Li_sp_m/10),
aes(x = Agei, y = Li_sp_m), shape = 21, size = 0.75, color = "black", fill = "#2abb9b") +
facet_grid(Species~Location, scales = "free") +
lims(y = c(0, NA)) +
theme(strip.text.y = element_text(angle = 360, face = "italic")) +
labs(x = "Age (years)", y = "Length at age i (TL, cm)")Figure 4. Relation between length (TL, mm) and age by species and location.
# 1. Extract data from fishbase ----
# 1.1 Extract VBGF parameters estimates from fishbase --
fishbase_vbgf <- growth_params(unique(data_complete$Species)) %>%
select(-method, -comments) %>%
rename(Species = species)
# 1.2 Extract maximum weight (Wmax), length (Lmax) and age (tmax) from fishbase --
fishbase_vbgf <- popchar(unique(data_complete$Species)) %>%
select(Species, Wmax, Lmax, tmax, Locality, SourceRef) %>%
full_join(., fishbase_vbgf) %>%
rename(RefNo = SourceRef)
# 1.3 Extract references from fishbase --
fishbase_vbgf <- references(unique(fishbase_vbgf$RefNo)) %>%
select(RefNo, ShortCitation, Title, Source, RefType) %>%
rename() %>%
full_join(., fishbase_vbgf)# 1. Comparison of VBGF parameters between our study and literature ----
read.csv("./../data/results_regressions_vbgc.csv") %>%
mutate(k = paste0(round(k, 3), " (", round(k_sd, 3), ")"),
linf = paste0(round(linf, 3), " (", round(linf_sd, 3), ")"),
t0 = paste0(round(t0, 3), " (", round(t0_sd, 3), ")")) %>%
select(Species, Location, linf, k, t0) %>%
rename(Linf = linf) %>%
mutate(ShortCitation = "Morat et al. 2020") %>%
full_join(., fishbase_vbgf %>%
select(-Wmax, -Lmax, -tmax, -RefType, -RefNo, -Title, -Source) %>%
rename(Location = Locality) %>%
mutate(k = as.character(k),
Linf = as.character(Linf),
t0 = as.character(t0)) %>%
filter(!(is.na(k)), !(is.na(Linf)), !(is.na(t0)))) %>%
arrange(Species) %>%
kable(.,
format = "html", escape = FALSE,
col.names = c("Species", "Location", "Linf", "K", "t0", "Reference"),
caption = "Table 6. Comparison between .") %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
column_spec(1, italic = T)| Species | Location | Linf | K | t0 | Reference |
|---|---|---|---|---|---|
| Abudefduf sexfasciatus | Gambiers | 11.35 (5.929) | 1.823 (1.544) | 0.395 (0.747) | Morat et al. 2020 |
| Acanthurus achilles | Manuae | 19.209 (0.675) | 0.988 (0.129) | -0.039 (0.036) | Morat et al. 2020 |
| Acanthurus lineatus | Marquesas | 26.837 (3.144) | 0.401 (0.115) | -0.215 (0.153) | Morat et al. 2020 |
| Acanthurus nigricans | Marquesas | 16.989 (0.982) | 1.134 (0.174) | -0.02 (0.025) | Morat et al. 2020 |
| Acanthurus nigricans | Great Barrie Reef | 14.3 | 0.28 | -0.69 | NA |
| Acanthurus pyroferus | Marquesas | 20.031 (1.422) | 0.467 (0.095) | -0.193 (0.139) | Morat et al. 2020 |
| Acanthurus triostegus | Moorea | 15.714 (0.517) | 0.626 (0.066) | -0.098 (0.049) | Morat et al. 2020 |
| Acanthurus triostegus | NA | 20.3 | 1.43 | 0.0511 | NA |
| Balistapus undulatus | Marquesas | 22.251 (3.28) | 0.304 (0.137) | -0.211 (0.144) | Morat et al. 2020 |
| Balistapus undulatus | Moorea | 23.68 (7.401) | 0.196 (0.078) | -0.72 (0.532) | Morat et al. 2020 |
| Caranx melampygus | Moorea | 92.665 (4.896) | 0.085 (0.009) | -0.535 (0.216) | Morat et al. 2020 |
| Centropyge bispinosa | Moorea | 5.327 (0.848) | 0.864 (0.698) | -0.071 (0.036) | Morat et al. 2020 |
| Centropyge flavissima | Marquesas | 7.279 (1.621) | 0.916 (0.325) | -0.045 (0.039) | Morat et al. 2020 |
| Centropyge flavissima | Moorea | 8.223 (0.839) | 1.201 (0.324) | -0.03 (0.026) | Morat et al. 2020 |
| Centropyge flavissima | Gambiers | 12.553 (1.366) | 0.183 (0.037) | -0.923 (0.244) | Morat et al. 2020 |
| Cephalopholis argus | Moorea | 41.864 (10.28) | 0.192 (0.128) | -0.788 (0.636) | Morat et al. 2020 |
| Cephalopholis argus | Tuamotu | 34.998 (5.058) | 0.199 (0.06) | -0.526 (0.206) | Morat et al. 2020 |
| Cephalopholis argus | Gambiers | 42.876 (1.612) | 0.2 (0.022) | -0.651 (0.17) | Morat et al. 2020 |
| Cephalopholis argus | Hao | 43.468 (6.108) | 0.196 (0.055) | -0.29 (0.097) | Morat et al. 2020 |
| Cephalopholis argus | Great Barrier Reef and eastern Torres Strait | 38.7 | 0.27 | 0 | NA |
| Cephalopholis urodeta | Gambiers | 21.118 (2.06) | 0.142 (0.032) | -0.686 (0.185) | Morat et al. 2020 |
| Chaetodon citrinellus |
Lizard I. (14 |
9.07 | 2.15 | -0.074 | NA |
| Chaetodon ornatissimus | Marquesas | 14.811 (1.242) | 0.995 (0.216) | -0.026 (0.047) | Morat et al. 2020 |
| Chlorurus spilurus | Moorea | 22.614 (1.346) | 1.035 (0.18) | -0.025 (0.041) | Morat et al. 2020 |
| Chlorurus spilurus | Gambiers | 23.113 (1.832) | 0.67 (0.13) | -0.079 (0.053) | Morat et al. 2020 |
| Chlorurus spilurus | Guam | 21.8 | 0.95 | -0.075 | NA |
| Chromis iomelas | Moorea | 5.068 (0.446) | 1.146 (0.249) | -0.06 (0.026) | Morat et al. 2020 |
| Chromis viridis | Gambiers | 11.782 (1.19) | 0.893 (0.36) | -0.057 (0.062) | Morat et al. 2020 |
| Ctenochaetus marginatus | Marquesas | 22.129 (2.53) | 0.375 (0.071) | -0.159 (0.066) | Morat et al. 2020 |
| Ctenochaetus striatus | Moorea | 17.283 (0.577) | 1.014 (0.088) | -0.029 (0.02) | Morat et al. 2020 |
| Ctenochaetus striatus | Gambiers | 17.094 (0.558) | 0.5 (0.044) | -0.143 (0.058) | Morat et al. 2020 |
| Ctenochaetus striatus | Tutuila Island | 17 | 0.9 | 0.2 | NA |
| Dascyllus aruanus | Moorea | 5.608 (0.221) | 0.897 (0.099) | -0.055 (0.028) | Morat et al. 2020 |
| Dascyllus flavicaudus | Gambiers | 9.335 (0.628) | 0.342 (0.04) | -0.24 (0.074) | Morat et al. 2020 |
| Epibulus insidiator | Gambiers | 26.837 (1.872) | 0.304 (0.038) | -0.258 (0.079) | Morat et al. 2020 |
| Epinephelus fasciatus | Marquesas | 22.126 (1.916) | 0.552 (0.079) | -0.051 (0.035) | Morat et al. 2020 |
| Epinephelus fasciatus | Great Barrier Reef and eastern Torres Strait | 27.8 | 0.54 | 0 | NA |
| Epinephelus hexagonatus | Hao | 21.66 (1.051) | 0.527 (0.06) | -0.091 (0.053) | Morat et al. 2020 |
| Epinephelus merra | Moorea | 14.266 (0.898) | 1.13 (0.093) | -0.018 (0.015) | Morat et al. 2020 |
| Epinephelus merra | Gambiers | 18.685 (0.91) | 0.599 (0.075) | -0.112 (0.058) | Morat et al. 2020 |
| Epinephelus merra | Hao | 22.577 (0.612) | 0.791 (0.077) | -0.05 (0.035) | Morat et al. 2020 |
| Epinephelus polyphekadion | Hao | 54.938 (5.686) | 0.153 (0.021) | -0.412 (0.094) | Morat et al. 2020 |
| Epinephelus polyphekadion |
Kehpara, Pohnpei (6 |
44.7 | 0.251 | -0.41 | NA |
| Epinephelus polyphekadion | Great Barrier Reef and eastern Torres Strait | 54.7 | 0.2 | 0 | NA |
| Gnathodentex aureolineatus | Gambiers | 20.487 (1.002) | 0.38 (0.057) | -0.291 (0.115) | Morat et al. 2020 |
| Halichoeres trimaculatus | Gambiers | 18.016 (1.694) | 0.706 (0.15) | -0.035 (0.054) | Morat et al. 2020 |
| Lutjanus fulvus | Moorea | 23.967 (2.383) | 0.754 (0.177) | -0.041 (0.042) | Morat et al. 2020 |
| Lutjanus fulvus | Tuamotu | 26.727 (2.401) | 0.293 (0.056) | -0.416 (0.18) | Morat et al. 2020 |
| Lutjanus fulvus | Yaeyama Islands, Okinawa | 27 | 0.04 | -0.48 | Shimose et al. 2014 |
| Lutjanus fulvus | Yaeyama Islands, Okinawa | 25.7 | 0.44 | -0.42 | Shimose et al. 2014 |
| Lutjanus gibbus | Bunaken Marine Park, North Sulawesi | 27.4 | 0.78 | -0.24 | NA |
| Lutjanus gibbus | Great Barrier Reef and eastern Torres Strait | 35.2 | 0.51 | 0 | NA |
| Lutjanus gibbus |
Ishigaki Island, Okinawa, 24 |
30.3 | 0.256 | -3.05 | Nanami et al. 2010 |
| Lutjanus gibbus |
Ishigaki Island, Okinawa, 24 |
39.1 | 0.21 | -1.88 | Nanami et al. 2010 |
| Lutjanus kasmira | NA | 40 | 0.212 | -0.75 | NA |
| Lutjanus kasmira | NA | 29.6 | 0.384 | -1.35 | NA |
| Lutjanus kasmira | (deep water) | 39.6 | 0.212 | -0.75 | NA |
| Mulloidichthys flavolineatus | Moorea | 25.68 (0.548) | 1.275 (0.09) | -0.013 (0.013) | Morat et al. 2020 |
| Myripristis berndti | Gambiers | 23.964 (1.679) | 0.273 (0.046) | -0.499 (0.179) | Morat et al. 2020 |
| Myripristis berndti | Marquesas | 21.923 (0.549) | 0.327 (0.031) | -0.359 (0.112) | Morat et al. 2020 |
| Myripristis berndti | Moorea | 18.006 (0.941) | 0.434 (0.05) | -0.153 (0.053) | Morat et al. 2020 |
| Naso lituratus | Gambiers | 32.04 (1.897) | 1.234 (0.168) | -0.01 (0.018) | Morat et al. 2020 |
| Naso unicornis | Oahu | 47.8 | 0.44 | -0.12 | NA |
| Odonus niger | Moorea | 24.067 (1.341) | 0.526 (0.065) | -0.089 (0.044) | Morat et al. 2020 |
| Ostorhinchus angustatus | Moorea | 7.398 (0.41) | 0.604 (0.082) | -0.125 (0.042) | Morat et al. 2020 |
| Ostorhinchus apogonoides | Marquesas | 8.174 (0.213) | 0.916 (0.058) | -0.066 (0.013) | Morat et al. 2020 |
| Plectropomus laevis | Gambiers | 91.508 (3.978) | 0.156 (0.013) | -0.558 (0.118) | Morat et al. 2020 |
| Plectropomus laevis | Hao | 91.742 (5.664) | 0.274 (0.03) | -0.026 (0.026) | Morat et al. 2020 |
| Plectropomus laevis | Great Barrier Reef and eastern Torres Strait | 78.8 | 0.3 | 0 | NA |
| Pristiapogon taeniopterus | Marquesas | 7.988 (0.264) | 0.85 (0.073) | -0.084 (0.024) | Morat et al. 2020 |
| Sargocentron microstoma | Moorea | 16.268 (0.543) | 0.66 (0.053) | -0.056 (0.027) | Morat et al. 2020 |
| Scarus psittacus | Guam | 20.7 | 0.91 | -0.083 | NA |
| Scarus psittacus |
Lizard Is. (14 |
21.5 | 0.347 | -1.122 | Choat et al. 1996 |
| Siganus argenteus | Gambiers | 33.002 (4.327) | 0.225 (0.055) | -0.333 (0.217) | Morat et al. 2020 |
| Stegastes nigricans | Moorea | 13.463 (2.073) | 0.306 (0.126) | -0.354 (0.194) | Morat et al. 2020 |
| Zebrasoma scopas | Great Barrie Reef | 13.3 | 0.425 | -0.49 | NA |
# 1. Get predictions from fishbase data ----
fishbase_vbgf_pred <- fishbase_vbgf %>%
filter(!(is.na(k)), !(is.na(Linf)), !(is.na(t0))) %>%
mutate(Line = row_number()) %>%
group_by(Line) %>%
do(pred_vbgf(data = .))
# 2. Load predictions from back-calculated data (our study) ----
backcalc_vbgf_pred <- read.csv("./../data/results_regressions_prediction.csv")
# 3. Make the plot ----
plot_final <- ggplot() +
geom_ribbon(data = backcalc_vbgf_pred, aes(x = age, ymin = ypred_lq, ymax = ypred_uq, group = Location),
fill = "#86e2d5", alpha = 0.4) +
geom_line(data = backcalc_vbgf_pred, aes(x = age, y = ypred_m, group = Location), size = 0.7, color = "#2abb9b") +
geom_line(data = fishbase_vbgf_pred, aes(x = Agei, y = Li, group = as.factor(Line), text = ShortCitation), size = 0.7) +
facet_wrap(~Species, ncol = 5, scales = "free") +
labs(x = "Age i", y = "Length (cm)") +
theme(strip.text.x = element_text(face = "italic"))
plot_final# 1. Comparison of the maximum age between our study and literature ----
fishbase_vbgf %>%
filter(!(is.na(RefNo))) %>%
group_by(Species) %>%
summarise(tmax = max(tmax),
Lmax = max(Lmax)) %>%
filter_at(vars(tmax, Lmax), any_vars(!(is.na(.)))) %>%
left_join(., fishbase_vbgf %>%
filter(!(is.na(RefNo)))) %>%
select(-Wmax, -k, -Linf, -t0) %>%
unique() %>%
right_join(., data_complete %>%
select(Species, Agecpt, Lcpt) %>%
group_by(Species) %>%
summarise(Agecpt = max(Agecpt),
Lcpt = max(Lcpt))) %>%
# Make the HTML table
mutate(Lcpt = Lcpt/10) %>%
select(Species, Lcpt, Agecpt, Lmax, tmax, ShortCitation, Locality) %>%
mutate(Species = cell_spec(Species, color = "black"),
Lcpt = cell_spec(Lcpt, color = ifelse(is.na(Lmax), "black", ifelse(Lcpt > Lmax, "#d91e18", "#00b16a"))),
Agecpt = cell_spec(Agecpt, color = ifelse(is.na(tmax), "black", ifelse(Agecpt > tmax, "#d91e18", "#00b16a"))),
Lmax = cell_spec(Lmax, "html", color = ifelse(is.na(Lmax), "white", "black")),
tmax = cell_spec(tmax, "html", color = ifelse(is.na(tmax), "white", "black")),
ShortCitation = cell_spec(ShortCitation, "html", color = ifelse(is.na(ShortCitation), "white", "black")),
Locality = cell_spec(Locality, "html", color = ifelse(is.na(Locality), "white", "black"))) %>%
kable(.,
format = "html", escape = FALSE,
col.names = c("Species", "Lmax", "Agemax", "Lmax", "Agemax", "Reference", "Location"),
caption = "Table 4. Comparison of maximum length (Lmax) and age (Agemax) between our study and the litterature. Red color indicates Lmax and Agemax values for our study greater than Lmax and Agemax reported in litterature, green color indicates lower values.") %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
column_spec(1, italic = T) %>%
add_header_above(c(" " = 1, "Our Study" = 2, "Litterature" = 4))| Species | Lmax | Agemax | Lmax | Agemax | Reference | Location |
|---|---|---|---|---|---|---|
| Acanthurus nigricans | 21 | 9 | NA | 34 | Choat et al. 2002 | Great Barrier Reef |
| Acanthurus pyroferus | 23 | 19 | NA | 28 | Choat et al. 2002 | Great Barrier Reef |
| Acanthurus triostegus | 19.3544 | 12 | 17.9 | NA | Murty 2002 | Lakshadweep lagoons, 1993-97 |
| Caranx melampygus | 71.2497 | 15 | 63.1 | 12 | Mohammed et al. 2016 | Shalateen, southern Red Sea, 2013-2014 |
| Cephalopholis argus | 45 | 21 | 55 | NA | Lau et al. 2000 | Asia-Pacific Region |
| Cephalopholis urodeta | 21.4 | 17 | 28 | NA | Lau et al. 2000 | Asia-Pacific Region |
| Chlorurus spilurus | 34.4108 | 16 | 26.5 | 9 | NA | NA |
| Chromis viridis | 14.8 | 9 | 11.4 | NA | Murty 2002 | Lakshadweep lagoons, 1993-97 |
| Ctenochaetus striatus | 21.7856 | 17 | NA | 36 | Choat et al. 2002 | northern Great Barrier Reef (sheltered) |
| Epinephelus fasciatus | 25.6 | 13 | 52 | NA | Rafail 1972 | Alexandria ?, 1962 |
| Epinephelus hexagonatus | 26.8 | 14 | 27.5 | NA | Murty 2002 | Lakshadweep lagoons, 1993-97 |
| Epinephelus merra | 26.1 | 17 | 31 | NA | Lau et al. 2000 | Asia-Pacific Region |
| Epinephelus polyphekadion | 51.4 | 20 | 109 | NA | Lau et al. 2000 | Asia-Pacific Region |
| Gnathodentex aureolineatus | 25.477 | 17 | 23 | NA | Nacorda et al. 2017 | Philippine Rise |
| Gymnosarda unicolor | 98.469 | 7 | 150 | NA | Nacorda et al. 2017 | Philippine Rise |
| Lutjanus fulvus | 28.8888 | 21 | 33.2 | 34 | Shimose et al. 2014 | Yaeyama Islands, Okinawa |
| Lutjanus kasmira | 32.626 | 30 | 40 | NA | Lau et al. 2000 | Asia-Pacific Region |
| Monotaxis grandoculis | 50.538 | 20 | 57 | NA | Palla et al. 2018 | Palawan / 1998-2014 |
| Mulloidichthys flavolineatus | 31.1136 | 6 | 26.5 | NA | Murty 2002 | Lakshadweep lagoons, 1993-97 |
| Naso lituratus | 43.248 | 10 | NA | 39 | Choat et al. 2002 | northern Great Barrier Reef |
| Naso unicornis | 61.265 | 17 | 36.3 | NA | Al-Shogeba… et al. 2014 | City of Shalala at the Arabian Sea coast of Oman |
| Parupeneus barberinus | 49.601 | 6 | 41 | NA | Randall 2004 | Not specified |
| Plectropomus laevis | 95.724 | 22 | 115 | NA | Lau et al. 2000 | Aisa-Pacific Region |
| Zebrasoma scopas | 16.6 | 24 | NA | 33 | Choat et al. 2002 | Great Barrier Reef |
| Abudefduf sexfasciatus | 17.2 | 13 | NA | NA | NA | NA |
| Acanthurus achilles | 24.551 | 27 | NA | NA | NA | NA |
| Acanthurus lineatus | 36.2 | 23 | NA | NA | NA | NA |
| Balistapus undulatus | 28.3016 | 18 | NA | NA | NA | NA |
| Centropyge bispinosa | 8.0267 | 11 | NA | NA | NA | NA |
| Centropyge flavissima | 14.98 | 27 | NA | NA | NA | NA |
| Chaetodon citrinellus | 10.0748 | 6 | NA | NA | NA | NA |
| Chaetodon ornatissimus | 17.5 | 10 | NA | NA | NA | NA |
| Cheilinus chlorourus | 29.8773 | 6 | NA | NA | NA | NA |
| Chromis iomelas | 6.0669 | 5 | NA | NA | NA | NA |
| Ctenochaetus marginatus | 27 | 13 | NA | NA | NA | NA |
| Dascyllus aruanus | 7.0639 | 7 | NA | NA | NA | NA |
| Dascyllus flavicaudus | 10.4 | 13 | NA | NA | NA | NA |
| Epibulus insidiator | 35 | 16 | NA | NA | NA | NA |
| Halichoeres trimaculatus | 18.6 | 5 | NA | NA | NA | NA |
| Lutjanus gibbus | 15.5469 | 1 | NA | NA | NA | NA |
| Myripristis berndti | 27.9 | 24 | NA | NA | NA | NA |
| Odonus niger | 35 | 16 | NA | NA | NA | NA |
| Ostorhinchus angustatus | 8.3009 | 6 | NA | NA | NA | NA |
| Ostorhinchus apogonoides | 9.5574 | 7 | NA | NA | NA | NA |
| Pristiapogon taeniopterus | 10.45 | 8 | NA | NA | NA | NA |
| Sargocentron microstoma | 20.3989 | 13 | NA | NA | NA | NA |
| Scarus psittacus | 31.149 | 6 | NA | NA | NA | NA |
| Siganus argenteus | 38.7606 | 13 | NA | NA | NA | NA |
| Siganus spinus | 25.3672 | 3 | NA | NA | NA | NA |
| Stegastes albifasciatus | 9.3714 | 8 | NA | NA | NA | NA |
| Stegastes nigricans | 13.8094 | 13 | NA | NA | NA | NA |
# 1. Extract the characteristics of individual used as otoliths section examples ----
sections_example <- data_complete %>%
filter(ID %in% c("GAM18_B006", "AC_LI_MA_03_17_221", "AC_NI_MA_03_17_118", "AC_PY_MA_03_17_009", "MOO18FE167",
"GAM18_B112", "CT_MA_MA_03_17_396", "GAM18_A033", "GAM18_A059", "GAM18_B080", # Acanthuridae
"OS_AP_MA_03_17_284", "PR_TA_MA_03_17_101", # Apogonidae
"OD_NI_MA_03_17_045", "BA_UN_MO_03_16_003", # Balistidae
"GAM18_A100", # Chaetodontidae
"GAM18_A156", "SA_MI_MA_03_17_128", # Holocentridae
"GAM18_B066", "GAM18_A011", "GAM18_A214", # Labridae
"GAM18_B105", "GAM18_B093", # Lethrinidae
"LU_GI_MA_03_17_058", "GAM18_B099", # Lutjanidae
"GAM18_B129", # Mullidae
"GAM18_A135", "CE_BI_MO_03_16_002", "GAM18_B056", "GAM18_A162", "DA_AR_MO_03_16_011",
"GAM18_A036", "GAM18_A191", "CH_JO_MO_03_16_013", # Pomacentridae
"GAM18_A120", "SC_PS_TA_03_16_019", # Scaridae
"GAM18_B012", # Scombridae
"GAM18_A073", "GAM18_A089", "EP_FA_MA_03_17_027", "H33", "GAM18_A154", "H70", "GAM18_B052", # Serranidae
"GAM18_B019", "SI_SP_MO_03_16_008")) %>% # Siganidae
filter(Agei == 0) %>%
select(Family, Species, ID, Agecpt, Lcpt, Location) %>%
arrange(Family, Species) %>%
mutate(Legend = paste0(row_number(), ". ", Species, " (", Agecpt, " years, ", Lcpt, " mm TL)"))
# 2. Export the txt file needed for the legend of the figure on otoliths sections ----
write.table(paste(sections_example$Legend, collapse = ", "),
"./../doc/03_resubmission_scientific-data/legend_fig_otolith_sections.txt",
col.names = FALSE, row.names = FALSE)## R version 4.0.1 (2020-06-06)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 18363)
##
## Matrix products: default
##
## locale:
## [1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252
## [3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
## [5] LC_TIME=French_France.1252
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] fishflux_0.0.1 plotly_4.9.2.1 readxl_1.3.1
## [4] rfishbase_3.0.4 formattable_0.2.0.1 kableExtra_1.1.0
## [7] forcats_0.5.0 stringr_1.4.0 dplyr_1.0.0
## [10] purrr_0.3.4 readr_1.3.1 tidyr_1.1.0
## [13] tibble_3.0.1 ggplot2_3.3.2 tidyverse_1.3.0
## [16] RColorBrewer_1.1-2 extrafont_0.17
##
## loaded via a namespace (and not attached):
## [1] nlme_3.1-148 matrixStats_0.56.0 fs_1.4.1
## [4] lubridate_1.7.9 webshot_0.5.2 httr_1.4.1
## [7] rstan_2.19.3 gh_1.1.0 tools_4.0.1
## [10] backports_1.1.7 R6_2.4.1 ggdist_2.1.1
## [13] DBI_1.1.0 lazyeval_0.2.2 colorspace_1.4-1
## [16] withr_2.2.0 tidyselect_1.1.0 gridExtra_2.3
## [19] prettyunits_1.1.1 processx_3.4.2 curl_4.3
## [22] compiler_4.0.1 extrafontdb_1.0 cli_2.0.2
## [25] rvest_0.3.5 arrayhelpers_1.1-0 xml2_1.3.2
## [28] labeling_0.3 scales_1.1.1 callr_3.4.3
## [31] digest_0.6.25 StanHeaders_2.21.0-5 rmarkdown_2.3
## [34] pkgconfig_2.0.3 htmltools_0.5.0 highr_0.8
## [37] dbplyr_1.4.4 htmlwidgets_1.5.1 rlang_0.4.6
## [40] rstudioapi_0.11 farver_2.0.3 svUnit_1.0.3
## [43] generics_0.0.2 jsonlite_1.6.1 crosstalk_1.1.0.1
## [46] inline_0.3.15 magrittr_1.5 loo_2.2.0
## [49] Rcpp_1.0.4.6 munsell_0.5.0 fansi_0.4.1
## [52] lifecycle_0.2.0 stringi_1.4.6 yaml_2.2.1
## [55] pkgbuild_1.0.8 plyr_1.8.6 grid_4.0.1
## [58] blob_1.2.1 parallel_4.0.1 fishualize_0.2.0
## [61] crayon_1.3.4 lattice_0.20-41 haven_2.3.1
## [64] hms_0.5.3 knitr_1.28 ps_1.3.3
## [67] pillar_1.4.4 codetools_0.2-16 stats4_4.0.1
## [70] reprex_0.3.0 glue_1.4.1 evaluate_0.14
## [73] data.table_1.12.8 RcppParallel_5.0.1 modelr_0.1.8
## [76] png_0.1-7 vctrs_0.3.1 Rttf2pt1_1.3.8
## [79] cellranger_1.1.0 gtable_0.3.0 assertthat_0.2.1
## [82] xfun_0.14 broom_0.5.6 coda_0.19-3
## [85] viridisLite_0.3.0 memoise_1.1.0 tidybayes_2.1.1
## [88] ellipsis_0.3.1
Jeremy WICQUART | jeremywicquart@gmail.com | 2020-07-08 10:26:50